<template>
  <div class="admin-login_item10">
    <div class="tiem10-head">
      <div class="head-title">欢迎回来</div>
      <div class="head-subtitle">登录系统需要您填写账号密码</div>
      <div>
        <input class="head-admic" v-model="user.username" placeholder="账号" />
      </div>
      <div>
         <input class="head-admic" v-model="user.password" type="password" placeholder="密码" />
      </div>

      <!-- <div class="head-forgt"><a class="head-forgt-alin" href="#">忘记密码?</a></div> -->
      <div class="item10-login-buton">
        <el-button class="buton-action" @click="OnSubmit" :loading="loading">立即登录</el-button>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
     data() {
       return {
         loading: false,
         user: {
         	username: '',
         	password: ''
         }
       }
     },
     mounted() {
     	this.init()
     },
     methods: {
       async OnSubmit() {
        this.loading = true
        await this.$ala.userLogin(this.user)
        this.loading = false
        await this.$emit('afterLogin')
       }
     }
   }
</script>

<style lang="scss">
  .admin-login_item10{
    position: relative;
    width: 100%;
    height: 100%;
    min-width: 1200px;
    display: flex;
    flex-direction: row;
    background: url("https://diyapi.5ug.com/wwwroot/uploads/api/256-116-382/2022-02-17/620de4a3051295f55528990f.png");
    overflow: hidden;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    .tiem10-head{
      top: 20%;
      left: 62%;
      min-width: 0;
      position: absolute;
    }
    .head-title{
      font-size: 35px;
      color: #095AE8;
    }
    .head-subtitle{
      padding: 10px 0;
      font-size: 25px;
      color: #095AE8;
    }
    .head-admic{
      outline:none;
      margin: 10px 0;
      border-radius: 46px;
      width: 320px;
      height: 46px;
      border: 1px solid #066FD1;
      font-size: 16px;
      //color: #066FD1;
      padding: 8px 15px;
      background-color: #F4F4F4;
    }
    .head-admic::-webkit-input-placeholder{
      color: #679EFF;
    }
    .head-forgt{
      margin-top: 5px;
      .head-forgt-alin{
        font-size: 14px;
        color: #679EFF;
      }
      .head-forgt-alin:hover{
        color: #066FD1;
        font-weight: bold;
      }
    }
    .item10-login-buton{
      font-size: 20px;
      width: 320px;
      height: 46px;
      margin-top: 20px;
      .buton-action {
        font-size: 20px;
        background-color: #066FD1;
        color: #ffffff;
        width: 320px;
        padding: 12px 0px;
        border-radius: 46px;
      }
    }
    .item10-login-buton span {
        font-size: 23px;
        letter-spacing:5px
      }
  }
</style>
